package sma.organizations.signals;

import org.janusproject.kernel.agentsignal.Signal;


/**
 * This signal is fired when an obstacle has to move
 * 
 * @author Etienne Sainton
 * @version 0.2
 */
public class SendMoveObstacleSignal extends Signal {

	private static final long serialVersionUID = 907849552158727195L;
	
	/**
	 * New obstacle position
	 */
	private final int position;
	
	/**
	 * Neighbor obstacle position
	 */
	private final int neighborObstaclePosition;
			
	/**
	 * @param source is the emitter of the signal
	 * @param _position is the new position
	 * @param _neighborObstaclePosition is the neighbor obstacle position
	 */
	public SendMoveObstacleSignal(Object source, int _position, int _neighborObstaclePosition) {
		super(source);
		this.position = _position;
		this.neighborObstaclePosition = _neighborObstaclePosition;
	}

	/** Replies the new position to send
	 * 
	 * @return the new position
	 */
	public int getPosition() {
		return this.position;
	}

	
	/** Replies the neighbor obstacle position to send
	 * 
	 * @return the neighbor obstacle position
	 */
	public int getLastObstaclePosition() {
		return this.neighborObstaclePosition;
	}
}
